![]() |
Kinetis SDK Demo Applications User Guide
1.0.0-beta
Freescale Semiconductor, Inc.
|
Functions | |
| static void | I2S_SendWavData (uint8_t *DataBuffer, uint32_t len) |
| Send I2S data. More... | |
| static void | snd_card_config (void) |
| Initialize the structure information for sai. More... | |
| void | PLAYSOUND_Init (void) |
| Init sound card. More... | |
| int | PLAYSOUND_Play (APP_GET_DATA_FUNC fpAppGetData) |
| Use sound card to play audio, need wave file data, only support standard Windows PCM uncompressed file. More... | |
| int | PLAYSOUND_GetWaveFileInfo (uint8_t *pBuffer, wave_file_t *pWave) |
| Decode wave file header, only support standard Windows PCM uncompressed file. More... | |
Variables | |
| sound_card_t | g_card |
| static sai_data_format_t | format |
| static sai_user_config_t | tx_config |
| static sai_handler_t | tx_handler |
| static sgtl_handler_t | codec_handler |
|
static |
This function should call PD layer funcion snd_trigger_tx.
| DataBuffer | pointer for data buffer |
| len | number of bytes to write |
| pformat | pointer to a wave data format struct |
| int PLAYSOUND_GetWaveFileInfo | ( | uint8_t * | pBuffer, |
| wave_file_t * | pWave | ||
| ) |
This function decode Windows PCM wave file data and, if success, loaded file header information into struct instance.
| [in] | pBuffer | Pointer to a wave file start address. |
| [in] | pWave | Pointer to a wave_file struct. |
| void PLAYSOUND_Init | ( | void | ) |
This function will initialize controller(K70's sai moudle) and decoder(SGTL5000) and config them with default values for play audio.
| int PLAYSOUND_Play | ( | APP_GET_DATA_FUNC | fpAppGetData | ) |
Before calling this function, we must make sure PLAYSOUND_Init has alrady called. This function will play audio according to wave file data which acquired by a user callback function. Prototyoe of "GetData" function: uint32_t APP_GetData(uint32_t NumBtytesReq, uint8_t **ppData, uint32_t offset)
| [in] | fpAppGetData | Pointer to a function which is called by PLAYSOUND_Play routine for getting data. |
|
static |
|
static |
|
static |
| sound_card_t g_card |
|
static |
|
static |